package  
{
	import org.flixel.*;
	/**
	 * ...
	 * @author le-ray_y
	 */
	public class Oil extends FlxSprite
	{
		// Enemy Graphics
		[Embed(source = '../../Assets/anim_oil.png')]
		private static var _oilGraph:Class;
		
		public function Oil(posX:Number, posY:Number) 
		{
			this.x = posX;
			this.y = posY;
			
			// Graphic
			this.loadGraphic(_oilGraph, true, false, 100, 236);
			
			// Animations & Play
			this.addAnimation("idle", [0, 1, 2, 3, 4, 5], 5, true);
			this.addAnimation("spill", [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], 10, false);
			this.play("idle");
		}
		
		override public function update():void
		{
			super.update();
			
			if (this._curFrame == 13 && this._curAnim.name == "spill")
			{
				this.play("idle");
			}
		}
		
	}

}